import { BaseLogic } from "../../common/base/BaseLogic";
import { BaseState } from "../../common/base/BaseState";
import Router from "../../routes/Router";
import { RouteNames } from "../../routes/Routes";
import PageTwoState from "./PageTwoState";

export default class PageTwoLogc implements BaseLogic<PageTwoState> {
    state: PageTwoState;

    setState(state:PageTwoState) {
        this.state = state
    }
    init(args): void {
        cc.log("page two init")
        cc.log("args is",args)
    }

    dispose(): void {
        cc.log("page two dispose")
    }
    
    close() {
        Router.back()
    }

    openNew() {
        Router.to(RouteNames.PAGE_ONE)
    }
}